<!DOCTYPE html>
<html>
<head>
    <title>{%- block page_title %}{%- endblock  %}</title>
    <link href="{{ url_for('static', filename='css/bootstrap.css') }}" rel="stylesheet" media="screen">
    <link href="/static/css/font-awesome.css" rel="stylesheet">
    <link href="/static/css/sports.css" rel="stylesheet">
    <link href="/static/css/select2.css" rel="stylesheet" >

    {%- block style %}{%- endblock%}
    <script src="/static/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="/static/js/bootstrap.js" type="text/javascript"></script>
    <script src="/static/js/jqBootstrapValidation.js"  type="text/javascript" ></script>
    <script src="/static/js/select2.min.js" type="text/javascript"></script>
    <script src="/static/js/select2_locale_zh-CN.js" "type="text/javascript"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>
<body class="layout-default">
<div id="wrapper" class="top-margin">
<div class="navbar navbar-inverse navbar-fixed-top top-nav">
    <div class="container">
        <a class="navbar-brand" href="../">Stars</a>
        <div class="nav-collapse collapse bs-navbar-collapse">
      <ul class="nav navbar-nav">
        <li>
          <a href="/">home</a>
        </li>
        <li>
          <a href="/playerswall">list</a>
        </li>
        <li>
          <a href="{{ url_for('backend.players') }}" target="_self">管理</a>
        </li> 
      </ul>
      <ul class="nav navbar-nav navbar-right">
        {% if current_user.is_authenticated() %}
          <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ current_user.login_id }}<b class="caret"></b></a>
                  <ul class="dropdown-menu">
                    <li><a href='{{ url_for("passport.logout") }}' target="_self">Sign out</a></li> 
                  </ul>
               </li> 
        {% else %}
        <li class="active"><a href='{{ url_for("passport.login") }}' target="_self">Sign in</a></li>
        {% endif %}
      </ul>
    </div>
    </div>
</div> 
<div class="container" style="margin-top:100px;">
        <div class="row">
            {% with errors = get_flashed_messages(category_filter=["error"]) %}
            {% if errors %}
            <div class="alert fade in alert-error">
                <button data-dismiss="alert" class="close" type="button">×</button>
                <ul>
                    {% for msg in errors %}
                    <li>{{ msg }}</li>
                    {% endfor %}
                </ul>
            </div>
            {% endif %}
        {% endwith %}
        {% with messages = get_flashed_messages(category_filter=["message"]) %}
            {% if messages %}
            <div class="alert fade in alert-success">
                <button data-dismiss="alert" class="close" type="button">×</button>
                <ul>
                    {% for msg in messages %}
                    <li>{{ msg }}</li>
                    {% endfor %}
                </ul>
            </div>
            {% endif %}
        {% endwith %}
        </div>
    </div>
</div>
<div class="container" >
    <div class="row">
    {% block content %}
    {% endblock %}
    </div>
</div>
